<template>
  <div>
    <transition name="fade">
      <loading v-if="isLoading"></loading>
    </transition>
  </div>
</template>
<script>
import Loading from "@/components/loading/index.vue";
import { flFunc, reFunc } from "@/request/index";
export default {
  data() {
    return {
      fl_listn: [],

      url: "",
      title: "",
      isLoading: true,
    };
  },
  components: { Loading },
  methods: {
    // axios 请求页面数据 .then 中将状态值修改  this.isLoading = false
    async csfe() {
      await flFunc().then((res) => {
        console.log(res);
        let fln = res.books[0].node[0];
        reFunc(fln.url).then((lisn) => {
          console.log(lisn);
          let nlist = lisn.list[0].labels;
          this.fl_listn = nlist.map((itemn) => {
            return itemn;
          });
        this.isLoading = false;
        }).catch(err => {
          console.log("请求失败...");
        });
      }).catch(err => {
          console.log("请求失败...");
        });
     
    },
  },
  created() {
    this.csfe();
  },
};
</script>